# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-dnslib
pkgver=0.9.23
pkgrel=2
pkgdesc="Simple library to encode/decode DNS wire-format packets"
arch=('any')
url="https://github.com/paulc/dnslib"
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/paulc/dnslib/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('f4e125a7a21b85aa6c5e69d7ee7cd41b784d83e04f70abfdac2706d95179f44ba44a2ebf5aeb5dfca62b9db450201036400c5fc99b04b9a69312ba60699836b4')

check() {
  cd dnslib-$pkgver
  VERSIONS=python ./run_tests.sh
}

package() {
  cd dnslib-$pkgver
  python setup.py install -O1 --root="$pkgdir"
}
